﻿using System;
using System.Data;
using System.Data.OracleClient;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DBUtility;
using Model;
using Model.DutyMainPage;

/*
创建日期：2009-03-04
编写人：张广  
功能说明: 值班主页
*/

namespace BLL.DutyMainPage
{
    /// <summary>
    /// 值班主页
    /// </summary>
    public class WatchMain
    {
        private readonly OracleDAL.DutyMainPage.WatchMain dal = new OracleDAL.DutyMainPage.WatchMain();

        /// <summary>
        /// 故障数据
        /// </summary>
        public DataSet GetMalfunction(string netWorkYYbm, string str, string duty_gzxsglsz,string duty_gzxsglszif, string paixuStr)
        {
            return dal.GetMalfunction(netWorkYYbm, str, duty_gzxsglsz,duty_gzxsglszif, paixuStr);
        }

        /// <summary>
        /// 查询今天值班人员
        /// </summary>
        /// <param name="unitisn">单位</param>
        /// <returns></returns>
        public OracleDataReader GetTodayWatch(string unitisn)
        {
            return dal.GetTodayWatch(unitisn);
        }

        /// <summary>
        /// 查询明天值班人员
        /// </summary>
        /// <param name="unitisn">单位</param>
        /// <returns></returns>
        public OracleDataReader GetTomorrowWatch(string unitisn)
        {
            return dal.GetTomorrowWatch(unitisn);
        }

        /// <summary>
        /// 查询后台故障处理模块状态
        /// </summary>
        /// <param name="faultSerialno">故障编号</param>
        /// <returns></returns>
        public DataSet GetNewFault(string faultSerialno)
        {
            return dal.GetNewFault(faultSerialno);
        }

        /// <summary>
        /// 查询网系长时间未发现故障列表
        /// </summary>
        /// <returns></returns>
        public DataSet GetNewFaultTime()
        {
            return dal.GetNewFaultTime();
        }

        /// <summary>
        /// 查询后台故障处理模块状态
        /// </summary>
        public DataSet GetFaultStatus()
        {
            return dal.GetFaultStatus();
        }

        /// <summary>
        /// 查询后台状态
        /// </summary>
        public DataSet GetAdpStatus()
        {
            return dal.GetAdpStatus();
        }

        /// <summary>
        /// 查询后台状态
        /// </summary>
        /// <param name="enfield">字段</param>
        /// <param name="nodeid">节点id</param>
        /// <returns></returns>
        public DataSet GetAdpStatus(string enfield, string nodeid)
        {
            return dal.GetAdpStatus(enfield,nodeid);
        }

        /// <summary>
        /// 查询门限
        /// </summary>
        public DataSet GetFirstMenXian()
        {
            return dal.GetFirstMenXian();
        }

        /// <summary>
        /// 历史故障数据
        /// </summary>
        /// <param name="strNode">节点</param>
        /// <param name="starttime">开始时间</param>
        /// <param name="endtime">结束时间</param>
        /// <param name="sswx">网系id</param>
        /// <param name="gzlx">类型</param>
        /// <param name="gzlxtj"></param>
        /// <param name="ssqy"></param>
        /// <param name="zrjd"></param>
        /// <param name="cxsj"></param>
        /// <param name="qztj"></param>
        /// <param name="qz"></param>
        /// <param name="NetWorkYYbm">网系权限</param>
        /// <returns></returns>
        public DataSet GetFaultHistory(string strNode, string starttime, string endtime, string sswx, string gzlx, string gzlxtj, string ssqy, string zrjd, string cxsj, string qztj, string qz, string NetWorkYYbm)
        {
            return dal.GetFaultHistory(strNode, starttime, endtime, sswx, gzlx, gzlxtj, ssqy, zrjd, cxsj, qztj, qz, NetWorkYYbm);
        }

        /// <summary>
        /// 修改权值
        /// </summary>
        /// <param name="tablename">表明</param>
        /// <param name="qzcolum">列</param>
        /// <param name="newqz">新权值</param>
        /// <param name="dealpersonColum"></param>
        /// <param name="userName">用户名称</param>
        /// <param name="faultnoColum">故障列</param>
        /// <param name="faultid">故障id</param>
        /// <returns></returns>
        public int UpdateWorkType(string tablename, string qzcolum, string newqz, string dealpersonColum, string userName, string faultnoColum, string faultid)
        {
            return dal.UpdateWorkType(tablename, qzcolum, newqz, dealpersonColum, userName, faultnoColum, faultid);
        }

        /// <summary>
        /// 存储登陆用户对哪些网有权限访问
        /// </summary>
        public DataSet SaveNetWork(string usergroupisn)
        {
            return dal.SaveNetWork(usergroupisn);
        }

        /// <summary>
        /// 绑定区域
        /// </summary>
        /// <param name="nodeid">节点id</param>
        /// <returns></returns>
        public OracleDataReader GetSsqy(string nodeid)
        {
            return dal.GetSsqy(nodeid);

        }

        /// <summary>
        /// 按照网系得到故障类型
        /// </summary>
        public DataSet GetFaultByNet(string netWorkID)
        {
            return dal.GetFaultByNet(netWorkID);
        }

        /// <summary>
        /// 查询日记记录
        /// </summary>
        public DataSet GetDiary(string seltype, string diary, string unitisn)
        {
            return dal.GetDiary(seltype, diary, unitisn);
        }

        /// <summary>
        /// 查询交班日记
        /// </summary>
        public DataSet GetFirstDiary(string unitisn)
        {
            return dal.GetFirstDiary(unitisn);
        }

        /// <summary>
        /// 添加日记
        /// </summary>
        public int AddFirstDiary(string random, string unitisn, string userisn)
        {
            return dal.AddFirstDiary(random, unitisn, userisn);
        }

        /// <summary>
        /// 得到用户名称
        /// </summary>
        public OracleDataReader GetZBY(string zby)
        {
            return dal.GetZBY(zby);
        }

        /// <summary>
        /// 得到值班日记
        /// </summary>
        public OracleDataReader GetSBZTchuli(string rjrecid)
        {
            return dal.GetSBZTchuli(rjrecid);
        }

        /// <summary>
        /// 判断是否存在
        /// </summary>
        public bool ValidhaveUpunit(string unitisn)
        {
            return dal.ValidhaveUpunit(unitisn);

        }

        /// <summary>
        /// 查询字典
        /// </summary>
        public OracleDataReader GetYWLXchuli(string ywlx)
        {
            return dal.GetYWLXchuli(ywlx);

        }

        /// <summary>
        /// 查询当前值班时间
        /// </summary>
        public OracleDataReader GetClqk(string unitisn)
        {
            return dal.GetClqk(unitisn);
        }

        /// <summary>
        /// 查询本班次的处理情况
        /// </summary>
        public OracleDataReader GetClqk1(string rjrecid, string rjid)
        {
            return dal.GetClqk1(rjrecid, rjid);

        }

        
        /// <summary>
        /// 查询
        /// </summary>
        public OracleDataReader GetZbdw(string unitisn)
        {
            return dal.GetZbdw(unitisn);

        }

        /// <summary>
        /// 创建随机数字
        /// </summary>
        public OracleDataReader GetIDRandom()
        {
            return dal.GetIDRandom();

        }

        /// <summary>
        /// 得到日记id
        /// </summary>
        public OracleDataReader GetDirayid(string unitisn)
        {
            return dal.GetDirayid(unitisn);

        }

        /// <summary>
        /// 得到信息
        /// </summary>
        public OracleDataReader GetChaKanRjSB(string rjrecid)
        {
            return dal.GetChaKanRjSB(rjrecid);

        }

        /// <summary>
        /// 得到信息
        /// </summary>
        public DataSet GetsetupYwlx()
        {
            return dal.GetsetupYwlx();
        }

        /// <summary>
        /// 得到信息
        /// </summary>
        public OracleDataReader GetLoadRj(string rjrecid)
        {
            return dal.GetLoadRj(rjrecid);

        }

        /// <summary>
        /// 得到单位信息
        /// </summary>
        public DataSet GetListsjdw(string unitisn)
        {
            return dal.GetListsjdw(unitisn);
        }

        /// <summary>
        /// 得到用户名称
        /// </summary>
        public OracleDataReader GetUsrName(string userisn)
        {
            return dal.GetUsrName(userisn);

        }

        /// <summary>
        /// 查出上级的值班日记
        /// </summary>
        public OracleDataReader GetShangBaoDuty(string cbk)
        {
            return dal.GetShangBaoDuty(cbk);

        }

        /// <summary>
        /// 给上级插入日记 这里事物失败会回滚
        /// </summary>
        public int AddShangBaoDuty(string random, string sjrjid, string unitisn, string userisn, string ddlYwlx, string txtNr, string rjrecid)
        {

            return dal.AddShangBaoDuty(random, sjrjid, unitisn, userisn, ddlYwlx, txtNr, rjrecid);

        }

        /// <summary>
        /// 修改信息 
        /// </summary>
        public int UpdateDuty(string inputYhDate, string rjrecid)
        {
            return dal.UpdateDuty(inputYhDate, rjrecid);


        }

        /// <summary>
        /// 修改信息 
        /// </summary>
        public int UpdateDuty(string rjrecid, string ddlYwlx, string TxtNr, string ddlClzt)
        {

            return dal.UpdateDuty(rjrecid,ddlYwlx,TxtNr,ddlClzt);


        }

        /// <summary>
        /// 查询当前值班时间
        /// </summary>
        public OracleDataReader GetDelclqk(string unitisn)
        {
            return dal.GetDelclqk(unitisn);

        }


        /// <summary>
        /// 删除本班次的处理情况
        /// </summary>
        public int Delclqk(string rjrecid, string rjid)
        {
            return dal.Delclqk(rjrecid, rjid);

        }

        /// <summary>
        /// 插入本班次的处理情况
        /// </summary>
        public int AddClqk(string rjid, string rjrecid, string txtclqk)
        {
            return dal.AddClqk(rjid, rjrecid, txtclqk);
        }

        /// <summary>
        /// 插入日记记录
        /// </summary>
        public int AddDuty(string rjrecid, string getRjId, string unitisn, string userisn, string ddlYwlx, string TxtNr, string ddlClzt)
        {
            return dal.AddDuty(rjrecid, getRjId, unitisn, userisn, ddlYwlx, TxtNr, ddlClzt);

        }

        /// <summary>
        /// 延后处理
        /// </summary>
        public int UpdateYanhou(string inputYhDate, string rjrecid)
        {
            return dal.UpdateYanhou(inputYhDate, rjrecid);

        }

        /// <summary>
        /// 删除日志记录
        /// </summary>
        public int DelRizhi(string rjrecid)
        {
            return dal.DelRizhi(rjrecid);

        }


        /// <summary>
        /// 获取历史的处理情况
        /// </summary>
        public DataSet GetLsclqk(string rjrecordid)
        {
            return dal.GetLsclqk(rjrecordid);
        }

        /// <summary>
        /// 交班员
        /// </summary>
        public OracleDataReader Getltr(string sczby)
        {
            return dal.Getltr(sczby);

        }

        /// <summary>
        /// 交班员1
        /// </summary>
        public DataSet Getltr1(string sczby)
        {
            return dal.Getltr1(sczby);
        }

        /// <summary>
        /// 交班员2
        /// </summary>
        public DataSet Getltr2(string unitisn)
        {
            return dal.Getltr2(unitisn);
        }

        /// <summary>
        /// 得到用户信息
        /// </summary>
        public OracleDataReader GetUserInfo(string userisn)
        {
            return dal.GetUserInfo(userisn);

        }
        
        /// <summary>
        /// 得到单位名称
        /// </summary>
        public OracleDataReader GetUnitInfo(string unitisn)
        {
            return dal.GetUnitInfo(unitisn);

        }

        /// <summary>
        /// 查询改用户是否在值班sec_wactnman表里
        /// </summary>
        public OracleDataReader ExistWatchman(string userisn)
        {
            return dal.ExistWatchman(userisn);
        }

        /// <summary>
        /// 查询值班sec_wactnman表里 值班人员
        /// </summary>
        public DataSet GetWatchman(string unitIsn)
        {
            return dal.GetWatchman(unitIsn);

        }

        /// <summary>
        /// 更新sec_wactnman表的信息
        /// </summary>
        public int UpdateWatchman(string unitisn, string userisn)
        {
            return dal.UpdateWatchman(unitisn, userisn);

        }

        /// <summary>
        /// 更新sec_wactnman表的最后登录时间
        /// </summary>
        public int UpdateWatchmanTime(string userisn)
        {

            return dal.UpdateWatchmanTime(userisn);


        }

        /// <summary>
        /// 添加sec_wactnman表的信息
        /// </summary>
        public int AddWatchmanInfo(string unitisn, string userisn, string userName)
        {

            return dal.AddWatchmanInfo(unitisn, userisn, userName);


        }

        /// <summary>
        /// 更新sec_wactnman表的信息
        /// </summary>
        public int UpdateWatchman(string unitisn, string userisn, string userName)
        {
            return dal.UpdateWatchman(unitisn, userisn, userName);


        }

        /// <summary>
        /// 更新值班员登录必须强行交接班
        /// </summary>
        public int UpdateSaveJb(string userisn, string inputJbDay, string ddlHour, string sczby, string unitisn, string rjid, string ddlTq, string txtWdmin, string txtWdmax)
        {
            return dal.UpdateSaveJb(userisn, inputJbDay, ddlHour, sczby, unitisn, rjid, ddlTq, txtWdmin, txtWdmax);

        }

        /// <summary>
        /// 查询上个值班员的接班时间
        /// </summary>
        public OracleDataReader GetJieBanTime(string sczby)
        {
            return dal.GetJieBanTime(sczby);

        
        }

        /// <summary>
        /// 查询上个值班员的交班时间
        /// </summary>
        public OracleDataReader GetJiaoBanTime(string sczby)
        {
            return dal.GetJiaoBanTime(sczby);

        }

        /// <summary>
        /// 更新上个值班员的交班时间
        /// </summary>
        public int UpdateJieBanTime(string inputJbDay, string ddlHour, string sczby, string unitisn, string jiaobantime)
        {
            return dal.UpdateJieBanTime(inputJbDay, ddlHour, sczby, unitisn, jiaobantime);

        }

        /// <summary>
        /// 查询本次值班日记
        /// </summary>
        public OracleDataReader GetWatchDiary(string userisn)
        {
            return dal.GetWatchDiary(userisn);

        }

        /// <summary>
        /// 更新自己的接班时间
        /// </summary>
        public int UpdateMyWatchTime(string txtWdmin, string txtWdmax, string inputJbDay, string ddlHour, string rjid, string ddlTq)
        {
            return dal.UpdateMyWatchTime(txtWdmin, txtWdmax, inputJbDay, ddlHour, rjid, ddlTq);

        }

        /// <summary>
        /// 更新上个值班员的交班时间
        /// </summary>
        public int UpdateUpWatchTime(string ddljbr, string inputJbDay, string ddlHour, string sczby, string unitisn, string rjid, string ddlTq, string txtWdmin, string txtWdmax)
        {
            return dal.UpdateUpWatchTime(ddljbr, inputJbDay, ddlHour, sczby, sczby, unitisn, ddlTq, txtWdmin, txtWdmax);

        }

        /// <summary>
        /// 更新值班排班
        /// </summary>
        public int UpdateZbPb(string jbrusrid, string jbrusrname, string unitisn)
        {
            return dal.UpdateZbPb(jbrusrid, jbrusrname, unitisn);


        }

        /// <summary>
        /// 添加值班排班
        /// </summary>
        public int AddZbPb(string unitisn, string userisn, string userName)
        {
            return dal.AddZbPb(unitisn, userisn, userName);

        }

        /// <summary>
        /// 查询上一班待处理的日记
        /// </summary>
        public DataSet GetWaitDiary(string unitisn)
        {
            return dal.GetWaitDiary(unitisn);
        }

        /// <summary>
        /// 上班待处理变为交下一班
        /// </summary>
        public int UpdateDownOver(string unitisn)
        {
            return dal.UpdateDownOver(unitisn);

        }

        /// <summary>
        /// 上班待处理变为本班待处理
        /// </summary>
        public int AddDownOver(string random, string rjid, string unitisn, string inputJbDay, string ddlHour, string zby, string ywlx, string nr, string clzt, string rjrecordid)
        {
            return dal.AddDownOver(random, rjid, unitisn, inputJbDay, ddlHour, zby, ywlx, nr, clzt, rjrecordid);

        }

        /// <summary>
        /// 查询交班时间时的用户
        /// </summary>
        public DataSet GetRiji(string oneday, string unitisn)
        {
            return dal.GetRiji(oneday, unitisn);
        }

        /// <summary>
        /// 统计日志
        /// </summary>
        public OracleDataReader GetRjrecCount(string rjid)
        {
            return dal.GetRjrecCount(rjid);

        }

        /// <summary>
        /// 查询日志记录
        /// </summary>
        public DataSet GetDiaryRecord(string unitisn, string zby, string inputStartTime, string inputEndTime, string ywlx)
        {
            return dal.GetDiaryRecord(unitisn, zby, inputStartTime, inputEndTime, ywlx);
        }

        /// <summary>
        /// 查询zby
        /// </summary>
        public DataSet GetSetupZby(string unitisn)
        {
            return dal.GetSetupZby(unitisn);
        }

        /// <summary>
        /// 值班要点
        /// </summary>
        public DataSet GetSetUpZbyd(string unitisn)
        {
            return dal.GetSetUpZbyd(unitisn);
        }

        /// <summary>
        /// 查询全部值班要点
        /// </summary>
        public DataSet GetAllZbyd(string unitisn)
        {
            return dal.GetAllZbyd(unitisn);
        }

        /// <summary>
        /// 公告
        /// </summary>
        public DataSet GetBulletin(string unitisn)
        {
            return dal.GetBulletin(unitisn);
        }

        /// <summary>
        /// 人员动态
        /// </summary>
        public DataSet GetPersonDynamic(string unitisn)
        {
            return dal.GetPersonDynamic(unitisn);
        }

        /// <summary>
        /// 人员动态筛选
        /// </summary>
        public DataSet GetDvPersonDynamic(string unitisn)
        {
            return dal.GetDvPersonDynamic(unitisn);
        }

        /// <summary>
        /// 人员动态
        /// </summary>
        public DataSet GetEditPersonDynamic(string unitisn)
        {
            return dal.GetEditPersonDynamic(unitisn);
        }

        /// <summary>
        /// 修改人员动态
        /// </summary>
        public int UpdatePersonDynamic(string id, string ddluser, string inputShengxiao, string inputShiXiao, string txtNr)
        {
            return dal.UpdatePersonDynamic(id, ddluser, inputShengxiao, inputShiXiao, txtNr);
        }

        /// <summary>
        /// 删除
        /// </summary>
        public int DelRydt(string id)
        {
            return dal.DelRydt(id);

        }

        /// <summary>
        /// 得到信息
        /// </summary>
        public OracleDataReader GetxgRydt(string id)
        {
            return dal.GetxgRydt(id);
        }

        /// <summary>
        /// 查询绑定数据
        /// </summary>
        public DataSet GetInitDdl(string unitisn)
        {
            return dal.GetInitDdl(unitisn);
        }

        /// <summary>
        /// 根据条件删除
        /// </summary>
        public int DelInitDdl(string xgid, string ddluser)
        {
            return dal.DelInitDdl(xgid, ddluser);

        }


        /// <summary>
        /// 插入信息
        /// </summary>
        public int AddInitDdl(string ddluser, string random, string unitisn, string inputShengxiao, string inputShiXiao, string txtNr)
        {
            return dal.AddInitDdl(ddluser, random, unitisn, inputShengxiao, inputShiXiao, txtNr);

        }

        /// <summary>
        /// 查询本次汇报的畅通率以及上几次存储的图形数据
        /// </summary>
        public DataSet GetGridDataList(string cyljType, string unitisn)
        {
            return dal.GetGridDataList(cyljType, unitisn);
        }

        /// <summary>
        /// 得到用户名称
        /// </summary>
        public DataSet GetAddUserName(string unitisn)
        {
            return dal.GetAddUserName(unitisn);
        }

        /// <summary>
        /// 删除值班要点原有数据
        /// </summary>
        public int DelDutyZbyd(string id)
        {
            return dal.DelDutyZbyd(id);

        }

        /// <summary>
        /// 添加值班要点
        /// </summary>
        public int AddDutyZbyd(string id, int order, string nr, string isShow, string unitisn)
        {
            return dal.AddDutyZbyd(id, order, nr, isShow, unitisn);

        }

        /// <summary>
        /// 修改值班要点
        /// </summary>
        public int UpdateDutyZbyd(string id, int order, string nr, string isShow)
        {
            return dal.UpdateDutyZbyd(id, order, nr, isShow);

        }

        /// <summary>
        /// 删除常用链接
        /// </summary>
        /// <param name="id">id</param>
        public int DelCyljlink(string id)
        {
            return dal.DelCyljlink(id);

        }

        /// <summary>
        /// 添加常用链接
        /// </summary>
        /// <param name="id">id</param>
        /// <param name="order">顺序号</param>
        /// <param name="name">名称</param>
        /// <param name="url">地址</param>
        /// <param name="isShow">是否显示</param>
        /// <returns></returns>
        public int AddCyljlink(string id, int order, string name, string url, string isShow)
        {
            return dal.AddCyljlink(id, order, name, url, isShow);
        }

        /// <summary>
        /// 修改常用链接
        /// </summary>
        /// <param name="id">id</param>
        /// <param name="order">顺序号</param>
        /// <param name="name">名称</param>
        /// <param name="url">地址</param>
        /// <param name="isShow">是否显示</param>
        /// <returns></returns>
        public int UpdateCyljlink(string id, int order, string name, string url, string isShow)
        {
            return dal.UpdateCyljlink(id, order, name, url, isShow);
            
        }

        /// <summary>
        /// 得到常用链接
        /// </summary>
        /// <returns></returns>
        public DataSet GetCyljlink()
        {
            return dal.GetCyljlink();
        }

        /// <summary>
        /// 删除近期工作
        /// </summary>
        public int DelDutyJqgz(string unitisn)
        {
            return dal.DelDutyJqgz(unitisn);

        }

        /// <summary>
        /// 添加近期工作
        /// </summary>
        public int AddDutyJqgz(int i, string cell1, string cell2, string unitisn)
        {
            return dal.AddDutyJqgz(i, cell1, cell2, unitisn);

        }

        /// <summary>
        /// 删除人员动态
        /// </summary>
        public int DelDutyRydt(string unitisn)
        {
            return dal.DelDutyRydt(unitisn);

        }

        /// <summary>
        /// 添加人员动态
        /// </summary>
        public int AddDutyRydt(int i, string random, string cell1, string cell4, string unitisn)
        {
            return dal.AddDutyRydt(i, random, cell1, cell4, unitisn);

        }

        /// <summary>
        /// 得到下级单位
        /// </summary>
        public DataSet GetUnitupdown(string unitisn)
        {
            return dal.GetUnitupdown(unitisn);

        }

        /// <summary>
        /// 得到下级单位值班员在线情况
        /// </summary>
        /// <param name="unitisn">单位id</param>
        /// <returns></returns>
        public DataSet GetUnitupdownOnline(string unitisn)
        {
            return dal.GetUnitupdownOnline(unitisn);

        }

        /// <summary>
        /// 得到上级单位单位值班员情况
        /// </summary>
        /// <param name="unitisn">单位id</param>
        /// <param name="isvalid">单位是否为网管中心</param>
        /// <returns></returns>
        public DataSet GetUnitupdownParent(string unitisn, bool isvalid)
        {
            return dal.GetUnitupdownParent(unitisn, isvalid);

        }

        /// <summary>
        /// 得到故障名称
        /// </summary>
        /// <param name="faultTypeID">故障类型id</param>
        /// <returns></returns>
        public OracleDataReader GetFaultType(string faultTypeID)
        {
            return dal.GetFaultType(faultTypeID);
        }

        /// <summary>
        /// 得到故障启用状态为开启
        /// </summary>
        /// <returns></returns>
        public DataSet GetFaultEnable()
        {
            return dal.GetFaultEnable();

        }

        /// <summary>
        /// 故障处置意见
        /// </summary>
        /// <returns></returns>
        public DataSet GetFaultTreatment(string netid, string faultid, string tableName)
        {
            return dal.GetFaultTreatment(netid, faultid, tableName);

        }

        /// <summary>
        /// 故障种类,自动网没有种类
        /// </summary>
        /// <param name="netid">网系id</param>
        /// <returns></returns>
        public OracleDataReader GetFaultTypeByNet(string netid)
        {
            return dal.GetFaultTypeByNet(netid);
        }

        /// <summary>
        /// 故障种类的值
        /// </summary>
        /// <param name="netid">网系id</param>
        /// <param name="faulttable">故障表名</param>
        /// <param name="faultid">故障id</param>
        /// <returns></returns>
        public OracleDataReader GetFaultTypeValue(string netid, string faulttable, string faultid)
        {
            return dal.GetFaultTypeValue(netid, faulttable, faultid);
        }

        /// <summary>
        /// 的到故障里的权值
        /// </summary>
        /// <param name="faultid">故障id</param>
        /// <returns></returns>
        public string GetFaultWorkType(string faultid)
        {

            return dal.GetFaultWorkType(faultid);

        }

        /// <summary>
        /// 添加故障处理意见
        /// </summary>
        /// <returns></returns>
        public int AddFaultIdea(string netid, string faulttable,string hisfaulttable, string strClyj, string faultid, string notetable, string randomid, string userisn, string nodeid, string unitisn, string userName, string unitName)
        {
            return dal.AddFaultIdea(netid, faulttable,hisfaulttable, strClyj, faultid, notetable, randomid, userisn, nodeid, unitisn, userName, unitName);
        }

        /// <summary>
        /// 保存权值
        /// </summary>
        /// <returns></returns>
        public int UpdateFaultQz(string faulttable, string qzcolum, string txtQz, string faultserialno, string faultid)
        {
            return dal.UpdateFaultQz(faulttable, qzcolum, txtQz, faultserialno, faultid);

        }

        /// <summary>
        /// 修改故障类型
        /// </summary>
        /// <param name="netid">网系id</param>
        /// <param name="faulttable">故障表名</param>
        /// <param name="faultType">故障类型</param>
        /// <param name="faultid">故障id</param>
        /// <param name="hisfaulttable">历史故障表</param>
        /// <returns></returns>
        public int UpdateFaultType(string netid, string faulttable, string faultType, string faultid, string hisfaulttable)
        {
            return dal.UpdateFaultType(netid, faulttable, faultType, faultid, hisfaulttable);
        }

        /// <summary>
        /// 得到重保单位数据
        /// </summary>
        /// <param name="unitisn">单位id</param>
        /// <returns></returns>
        public DataSet GetZbdwByUnit(string unitisn)
        {
            return dal.GetZbdwByUnit(unitisn);

        }

        /// <summary>
        /// 删除重保单位数据
        /// </summary>
        /// <param name="id">重保单位id</param>
        /// <returns></returns>
        public int DelZbdw(string id)
        {
            return dal.DelZbdw(id);

        }

        /// <summary>
        /// 得到重保单位节点
        /// </summary>
        /// <param name="unitisn">单位id</param>
        /// <returns></returns>
        public DataSet GetZbdwByNode(string nodeid)
        {
            return dal.GetZbdwByNode(nodeid);

        }

        /// <summary>
        /// 添加重保单位数据
        /// </summary>
        /// <param name="model">重保单位属性集合</param>
        /// <returns></returns>
        public int AddZbdw(Duty_Zbdw model)
        {
            return dal.AddZbdw(model);

        }


       


    }
}
